home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 2002-07-05 | 35.6 KB | 1,089 lines
<HTML> <HEAD> <LINK REL="stylesheet" TYPE="text/css" HREF="%2css/default.css"> <script language="Javascript"> //LOCALIZATION STRINGS var _errNullPrompt = "Prompt is null."; var _errSingleCurrValue = "doListBox: single current value expected"; var _errSingleDefaultValue = "doListBox: single default value expected"; var _strAddBtn = "Add"; var _strRemoveBtn = "Remove"; var _strStartRange = "Start Of Range:"; var _strEndRange = "End of Range:"; var _strInclude = "include value"; var _strNoLower = "no lower bound"; var _strNoUpper = "no upper bound"; var _strRangeError = "The start of range cannot be greater than the end of range." // strings that need localization - don't localize anything not listed here var L_BadNumber = "This parameter is of type \"Number\" and can only contain a negative sign, digits (\"0-9\"), and a period decimal separator. Please correct the entered parameter value."; var L_BadCurrency = "This parameter is of type \"Currency\" and can only contain a negative sign, digits (\"0-9\"), and a period decimal separator. Please correct the entered parameter value."; var L_BadDate = "This parameter is of type \"Date\" and should be in the format \"Date(yyyy,mm,dd)\" where \"yyyy\" is the four digit year, \"mm\" is the month (e.g. January = 1), and \"dd\" is the number of days into the given month."; var L_BadDateTime = "This parameter is of type \"DateTime\" and the correct format is \"DateTime(yyyy,mm,dd,hh,mm,ss)\". \"yyyy\" is the four digit year, \"mm\" is the month (e.g. January = 1), \"dd\" is the day of the month, \"hh\" is hours in a 24 hour, \"mm\" is minutes and \"ss\" is seconds."; var L_BadTime = "This parameter is of type \"Time\" and should be in the format \"Time(hh,mm,ss)\" where \"hh\" is hours in 24 a hour clock, \"mm\" is minutes into the hour, and \"ss\" is seconds into the minute."; var L_EmptyBoolean = "This parameter is of type \"Boolean\" and can not have an empty value."; // string that set to null value var _strSetToNull = "Set to NULL value"; var _strPromptAtViewTime = "Prompt the user for new value(s) when viewing"; var _strClearPromptValue = "Clear the current parameter value(s)"; var _strEmpty = "[EMPTY]"; var _currentVal = "Current Values:"; </script> <script> var linkPath = "%3"; </script> <script src="%3js/KeyDownEvent.js"></script> <script src="%3js/calendar.js"></script> <script src="%3js/parameter.js"></script> <script src="%4js/FormChek.js"></script> <script> var prompt = null; function getParameter() { var i = -1; var query = window.location.search; if ( query.length > 1 ) query = query.substring ( 1, query.length ); pp = query.split ( '&' ); for (var j=0; j<pp.length; j++) { arg = pp[j].split( '=' ); if (arg.length == 2 && arg[0] == "i") i = arg[1]; } prompt = parent.promptArray[i]; return prompt; } //FUNCTION TO TOGGLE THE INCLUDE UPPER/LOWER BOUND CHECKBOX ON OR OFF function ToggleBound( thisB, otherB, thisI, otherI ) { if ( thisB.checked ) { otherB.disabled = true; thisI.disabled = true; } else { thisI.disabled = false; if ( !otherI.checked ) otherB.disabled = false; } } //FUNCTION TO TOGGLE THE NO UPPER/LOWER BOUND CHECKBOX ON OR OFF function ToggleInclude( thisI, thisB, otherB ) { if ( thisI.checked ) { thisB.disabled = true; } else { if ( !otherB.checked ) thisB.disabled = false; } } function init ( ) { var prompt = getParameter(); if ( prompt.supportsDiscreteValues && !prompt.supportsRangeValues) { if ( prompt.enableMultipleValues ) doMultipleSingleValues (prompt); else doSingleValue (prompt); } else if ( !prompt.supportsDiscreteValues && prompt.supportsRangeValues) { if ( prompt.enableMultipleValues ) doMultipleRangeValues (prompt); else doRangeValue (prompt); } else { doDiscreteRangeValue(prompt); } displayClearValue(prompt); displayPromptAtViewTime(prompt); } function displayNullCheckBox() { if (prompt.enableNullValue) { document.writeln('<tr><td class="list">'); if (document.layers) document.writeln('<form name="nullform">'); document.writeln('<input type="checkbox" name="nullcheckbox"> </td>'); if (document.layers) document.writeln('</form>'); if (prompt.currentValues.length != 0) { if (prompt.currentValues[0].IsNullValue) { if (document.layers) this.document.forms.nullform.nullcheckbox.checked = true; else this.document.forms.param.nullcheckbox.checked = true; } } document.writeln('<td class="list"> <div>'+ _strSetToNull + ' </div> </td></tr>'); } } function displayPromptAtViewTime(prompt) { if (document.layers) document.writeln('<form name="viewtimeform">'); document.writeln('<table>'); document.writeln('<tr><td class="list">'); document.writeln('<input type="checkbox" name="viewtimecheckbox"> </td>'); if (prompt.PromptAtViewTime) { if (document.layers) this.document.forms.viewtimeform.viewtimecheckbox.checked = true; else this.document.forms.param.viewtimecheckbox.checked = true; } document.writeln('<td class="list">'+ _strPromptAtViewTime + '</td></tr>'); document.writeln('</table>'); if (document.layers) document.writeln('</form>'); } function displayClearValue(prompt) { if (document.layers) document.writeln('<form name="clearform">'); document.writeln('<table>'); document.writeln('<tr><td class="list">'); document.writeln('<input type="checkbox" name="clearcheckbox"> </td>'); document.writeln('<td class="list">'+ _strClearPromptValue + '</td></tr>'); document.writeln('</table>'); if (document.layers) document.writeln('</form>'); } function submit () { var prompt = getParameter(); if ( prompt.supportsDiscreteValues && !prompt.supportsRangeValues) { if ( prompt.enableMultipleValues ) submitMultipleSingleValues (prompt); else if (submitSingleValue ( prompt) == -1) return; } else if ( !prompt.supportsDiscreteValues && prompt.supportsRangeValues) { if ( prompt.enableMultipleValues ) submitMultipleRangeValues ( prompt); else if (submitRangeValue ( prompt) == -1) return; } else { submitDiscreteRangeValue(prompt); } submitViewAtRunTime(prompt); submitClearValue(prompt); prompt.isCurrentValueSet = true; location.href = "%1"; } function swap(name) { if (prompt) swapDDCtrl(name, prompt); else alert(_errNullPrompt); } // to hold the discrete value in the case discrete and range var g_mResultList = new Array(); var g_mDiscreteList = new Array(); //////////////////////////////////////////////////////////////// function submitDiscreteRangeValue( prompt) { if (prompt.enableNullValue) { if (document.layers) { if (this.document.forms.nullform.nullcheckbox.checked) { prompt.AddNullCurrentValue(); return; } } else { if (this.document.forms.param.nullcheckbox.checked) { prompt.AddNullCurrentValue(); return; } } } // if reach here, the prompt is not a nullable one. submitMultipleRangeValues(prompt); for (var i=0; i<g_mDiscreteList.length; i++) { if (g_mDiscreteList[i]) prompt.AddSingleCurrentValue(g_mDiscreteList[i]); } } function submitMultipleSingleValues(prompt) { if (prompt.enableNullValue) { if (document.layers) { if (this.document.forms.nullform.nullcheckbox.checked) { prompt.AddNullCurrentValue(); return; } } else { if (this.document.forms.param.nullcheckbox.checked) { prompt.AddNullCurrentValue(); return; } } } prompt.ClearCurrentValues(); var list; if (document.layers) list = document.forms.valueListForm.valuelist; else list = document.forms.param.valuelist; for (var i=0; i<list.length; i++) { prompt.AddSingleCurrentValue(list.options[i].value); } } function submitRangeValue(prompt) { if (prompt.enableNullValue) { if (document.layers) { if (this.document.forms.nullform.nullcheckbox.checked) { prompt.AddNullCurrentValue(); return; } } else { if (this.document.forms.param.nullcheckbox.checked) { prompt.AddNullCurrentValue(); return; } } } var param = prompt.edtbox.getRangeValue(); if (param == -1) return -1; var start = "", end = "", iu = false, il = false, nu = false, nl = false; start = param.fromValue; end = param.toValue; iu = param.includesUpperBound; nu = param.hasNoUpperBound; il = param.includesLowerBound; nl = param.hasNoLowerBound; prompt.ClearCurrentValues(); prompt.AddRangeCurrentValue(start,end,iu,il,nu,nl); } function submitMultipleRangeValues ( prompt) { if (prompt.enableNullValue) { if (document.layers) { if (this.document.forms.nullform.nullcheckbox.checked) { prompt.AddNullCurrentValue(); return; } } else { if (this.document.forms.param.nullcheckbox.checked) { prompt.AddNullCurrentValue(); return; } } } prompt.ClearCurrentValues(); for (var i=0; i<g_mResultList.length; i++) { if (g_mResultList[i]) { prompt.AddRangeCurrentValue(g_mResultList[i].fromValue, g_mResultList[i].toValue, g_mResultList[i].includesUpperBound, g_mResultList[i].includesLowerBound, g_mResultList[i].hasNoUpperBound, g_mResultList[i].hasNoLowerBound); } } } function submitViewAtRunTime( prompt ) { if (document.layers) { if (this.document.forms.viewtimeform.viewtimecheckbox.checked) { prompt.PromptAtViewTime = true; return; } else prompt.PromptAtViewTime = false; } else { if (this.document.forms.param.viewtimecheckbox.checked) { prompt.PromptAtViewTime = true; return; } else prompt.PromptAtViewTime = false; } } function submitClearValue( prompt ) { if (document.layers) { if (this.document.forms.clearform.clearcheckbox.checked) { prompt.ClearCurrentValues(); return; } } else { if (this.document.forms.param.clearcheckbox.checked) { prompt.ClearCurrentValues(); return; } } } function doMultipleRangeValues (prompt) { var il = false, nl = false, iu = false, nu = false; if ( prompt.currentValues != null && prompt.currentValues.length >= 1 && prompt.currentValues[0].IsRangeValue ) { il = prompt.currentValues[0].rangeValue.includesLowerBound; iu = prompt.currentValues[0].rangeValue.includesUpperBound; nl = prompt.currentValues[0].rangeValue.hasNoLowerBound; nu = prompt.currentValues[0].rangeValue.hasNoUpperBound; } document.writeln('<table>'); document.writeln('<tr><td class="list" width="150" valign="top">' + _strStartRange + '</td>'); document.writeln('<td class="list">'); var ctrl = new EditableDropDown (prompt); ctrl.WriteMultipleItems("FromPrompt", true); document.writeln('</td><td class="list">'); document.writeln('</td>'); document.writeln('</tr>'); document.writeln('<tr><td class="list"></td><td class="list">'); if (document.layers) { document.writeln('<form name="lowerForm">'); writeCheckbox('includesLower', _strInclude, il, ''); writeCheckbox('hasNoLower', _strNoLower, nl, ''); document.writeln('</form>'); } else { writeCheckbox('includesLower', _strInclude, il, 'ToggleInclude(document.forms.param.includesLower, document.forms.param.hasNoLower, document.forms.param.hasNoUpper);'); writeCheckbox('hasNoLower', _strNoLower, nl, 'ToggleBound(document.forms.param.hasNoLower, document.forms.param.hasNoUpper, document.forms.param.includesLower, document.forms.param.includesUpper);'); } document.writeln('</td><td class="list"></td></tr>'); document.writeln('<tr><td class="list" valign="top">' + _strEndRange + '</td>'); document.writeln('<td class="list">'); var ctrl = new EditableDropDown (prompt); ctrl.WriteMultipleItems("ToPrompt", false); document.writeln('</td><td class="list"></td> </tr>'); document.writeln('<tr><td class="list"></td><td class="list">'); if (document.layers) { document.writeln('<form name="upperForm">'); writeCheckbox('includesUpper', _strInclude, iu, ''); writeCheckbox('hasNoUpper', _strNoUpper, nu, ''); document.writeln('</form>'); } else { writeCheckbox('includesUpper', _strInclude, iu, 'ToggleInclude(document.forms.param.includesUpper, document.forms.param.hasNoUpper, document.forms.param.hasNoLower);'); writeCheckbox('hasNoUpper', _strNoUpper, nu, 'ToggleBound(document.forms.param.hasNoUpper, document.forms.param.hasNoLower, document.forms.param.includesUpper, document.forms.param.includesLower);'); } // init for checkboxes if (document.layers == null) { ToggleInclude(document.forms.param.includesLower, document.forms.param.hasNoLower, document.forms.param.hasNoUpper); ToggleBound(document.forms.param.hasNoLower, document.forms.param.hasNoUpper, document.forms.param.includesLower, document.forms.param.includesUpper); ToggleInclude(document.forms.param.includesUpper, document.forms.param.hasNoUpper, document.forms.param.hasNoLower); ToggleBound(document.forms.param.hasNoUpper, document.forms.param.hasNoLower, document.forms.param.includesUpper, document.forms.param.includesLower); } document.writeln('</td></tr>'); document.writeln('</table>'); document.writeln('<table border=0 cellpadding=0>'); document.writeln('<tr><td colspan = 2 class="list"></td>'); document.writeln('<td class="list">'); document.writeln('<table cellpadding=0 border=0><tr><td class="clsButton" align=middle nowrap>'); if (document.layers) document.writeln('<div class="clsButton"><a href="javascript: addRangeItem(this.document.forms.valueListForm.valuelist)">' + _strAddBtn + '</a></div>'); else document.writeln('<div class="clsButton"><a href="javascript: addRangeItem(this.document.forms.param.valuelist)">' + _strAddBtn + '</a></div>'); document.writeln('</td></tr></table>'); document.writeln('</td></tr>'); // seperator document.writeln('<tr><td class="list" colspan=3><hr size="1"></td></tr>'); document.writeln('<tr><td class="list" width="150">' + _currentVal + '</td><td>'); if (document.layers) document.writeln('<form name="valueListForm">'); document.writeln('<select name="valuelist" size=5>'); document.writeln('<option> This is a formatting ...................... string '); document.writeln('</select>'); if (document.layers) document.writeln('</form>'); document.writeln('</td>'); document.writeln('<td class="list" valign="top">'); document.writeln('<table cellpadding=0 border=0><tr><td class="clsButton" align=middle nowrap>'); if (document.layers) document.writeln('<div class="clsButton"><a href="javascript: removeDiscreteRangeItem(this.document.forms.valueListForm.valuelist)">' + _strRemoveBtn + '</a></div>'); else document.writeln('<div class="clsButton"><a href="javascript: removeDiscreteRangeItem(this.document.forms.param.valuelist)">' + _strRemoveBtn + '</a></div>'); document.writeln('</td></tr></table>'); document.writeln('</td></tr>'); displayNullCheckBox(); document.writeln('</table>'); var dest; if (document.layers) { dest = this.document.forms.valueListForm.valuelist; dest.options[0] = null; } else { dest = this.document.forms.param.valuelist; dest.options[0] = null; } for (var i=0; i < prompt.currentValues.length; i++) { if (prompt.currentValues[i].IsRangeValue) { addRangeString (prompt.currentValues[i].rangeValue.fromValue, prompt.currentValues[i].rangeValue.toValue, prompt.currentValues[i].rangeValue.includesLowerBound, prompt.currentValues[i].rangeValue.hasNoLowerBound, prompt.currentValues[i].rangeValue.includesUpperBound, prompt.currentValues[i].rangeValue.hasNoUpperBound, dest, prompt.editMask); } else if (prompt.currentValues[i].IsSingleValue) { addDiscreteString(prompt.currentValues[i].singleValue.value, dest, prompt.editMask); } } // end for } function writeCheckbox(name, str, checked, onclickhandler) { document.writeln('<input type="checkbox" name="' + name + '" value="true" '); if (checked) document.writeln('checked'); if (onclickhandler.length > 0) { document.writeln(' onClick="' + onclickhandler + '"'); } document.writeln(' >'); document.writeln(str); } function doRangeValue (prompt) { var il = false, nl = false, iu = false, nu = false; if ( prompt.currentValues != null && prompt.currentValues.length >= 1 && prompt.currentValues[0].IsRangeValue ) { il = prompt.currentValues[0].rangeValue.includesLowerBound; iu = prompt.currentValues[0].rangeValue.includesUpperBound; nl = prompt.currentValues[0].rangeValue.hasNoLowerBound; nu = prompt.currentValues[0].rangeValue.hasNoUpperBound; } document.writeln('<table>'); document.writeln('<tr><td class="list" width="150" valign="top">' + _strStartRange + '</td>'); document.writeln('<td class="list">'); var ctrl = new EditableDropDown (prompt); ctrl.WriteMultipleItems("FromPrompt", true); document.writeln('</td></tr>'); document.writeln('<tr><td class="list"> </td> <td class="list">'); if (document.layers) { document.writeln('<form name="lowerForm">'); writeCheckbox('includesLower', _strInclude, il, ''); writeCheckbox('hasNoLower', _strNoLower, nl, ''); document.writeln('</form>'); } else { writeCheckbox('includesLower', _strInclude, il, 'ToggleInclude(document.forms.param.includesLower, document.forms.param.hasNoLower, document.forms.param.hasNoUpper);'); writeCheckbox('hasNoLower', _strNoLower, nl, 'ToggleBound(document.forms.param.hasNoLower, document.forms.param.hasNoUpper, document.forms.param.includesLower, document.forms.param.includesUpper);'); } document.writeln('</td></tr>'); document.writeln('<tr><td class="list" valign="top">' + _strEndRange + '</td>'); document.writeln('<td class="list">'); var ctrl = new EditableDropDown (prompt); ctrl.WriteMultipleItems("ToPrompt", false); document.writeln('</td></tr>'); document.writeln('<tr><td class="list"></td><td class="list">'); if (document.layers) { document.writeln('<form name="upperForm">'); writeCheckbox('includesUpper', _strInclude, iu, ''); writeCheckbox('hasNoUpper', _strNoUpper, nu, ''); document.writeln('</form>'); } else { writeCheckbox('includesUpper', _strInclude, iu, 'ToggleInclude(document.forms.param.includesUpper, document.forms.param.hasNoUpper, document.forms.param.hasNoLower);'); writeCheckbox('hasNoUpper', _strNoUpper, nu, 'ToggleBound(document.forms.param.hasNoUpper, document.forms.param.hasNoLower, document.forms.param.includesUpper, document.forms.param.includesLower);'); } // init for checkboxes if (document.layers == null) { ToggleInclude(document.forms.param.includesLower, document.forms.param.hasNoLower, document.forms.param.hasNoUpper); ToggleBound(document.forms.param.hasNoLower, document.forms.param.hasNoUpper, document.forms.param.includesLower, document.forms.param.includesUpper); ToggleInclude(document.forms.param.includesUpper, document.forms.param.hasNoUpper, document.forms.param.hasNoLower); ToggleBound(document.forms.param.hasNoUpper, document.forms.param.hasNoLower, document.forms.param.includesUpper, document.forms.param.includesLower); } document.writeln('</td></tr>'); displayNullCheckBox(); document.writeln('</table>'); } function addRangeItem(dest) { var param = prompt.edtbox.getRangeValue ( ); if (param == -1) return; var start = "", end = "", iu = false, il = false, nu = false, nl = false; start = param.fromValue; end = param.toValue; iu = param.includesUpperBound; nu = param.hasNoUpperBound; il = param.includesLowerBound; nl = param.hasNoLowerBound; addRangeString(start,end,il,nl,iu,nu,dest, prompt.editMask); } function addRangeString(from,to,il,nl,iu,nu,dest, editMask) { var item = new parameterRangeValue(from, to, iu, il, nu, nl, editMask); var str = item.ValueDisplayString (); for (var i=0; i<dest.length; i++) { if (dest.options[i].value == str) return; } dest.options[dest.length] = new Option(str, str); g_mResultList[g_mResultList.length] = item; } // remove item from the global array function removeDiscreteRangeItem(dest) { if ( dest.selectedIndex >= 0 ) { var str = dest.options[dest.selectedIndex].value; for (var i=0; i<g_mResultList.length; i++) { if ( g_mResultList[i] && g_mResultList[i].ValueDisplayString() == str ) { g_mResultList[i] = null; break; } } for (var i=0; i<g_mDiscreteList.length; i++) { if ( g_mDiscreteList[i] && g_mDiscreteList[i] == str ) { g_mDiscreteList[i] = null; break; } } dest.options[dest.selectedIndex] = null; } } function addItemString(string, dest) { if (string != "") { for (var i=0; i<dest.length; i++) { if (dest.options[i].value == string) return; } dest.options[dest.length] = new Option(string, string); } } function addItem(dest) { var param = prompt.edtbox.getSingleValue(); if (param == -1) return; addItemString(param.value, dest); } function removeItem(dest) { for (var i=0; i<dest.length; i++) { if (dest.options[i].selected) { dest.options[i] = null; return; } } } // return true if s is in the string array function contains(strarray, s) { for (var i=0; i<strarray.length; i++) { if ( strarray[i] == s ) return true; } return false; } function doListBox (edit, defaults, currents) { document.writeln('<select onchange="OnChangeListItem()" name="value">'); var itemsInList = new Array(); if (currents != null) { for (var i=0; i<currents.length; i++) { if (currents[i].IsSingleValue) { itemsInList[itemsInList.length] = currents[i].singleValue.value; document.writeln('<option selected value="' + currents[i].singleValue.value + '">' + currents[i].ValueDisplayString() ); } else { alert(_errSingleCurrValue); } } } for (var i=0; i<defaults.length; i++) { if (defaults[i].IsSingleValue) { str = defaults[i].singleValue.value; display = defaults[i].ValueDisplayString(); if ( !contains(itemsInList, str) ) { document.writeln('<option value="' + str + '">' + display ); } } else { alert(_errSingleDefaultValue); } } document.writeln('</select>'); } function submitSingleValue(prompt) { if (prompt.enableNullValue) { if (document.layers) { if (this.document.forms.nullform.nullcheckbox.checked) { prompt.AddNullCurrentValue(); return; } } else { if (this.document.forms.param.nullcheckbox.checked) { prompt.AddNullCurrentValue(); return; } } } prompt.ClearCurrentValues(); var param = prompt.edtbox.getSingleValue(); if (param == -1) return -1; prompt.AddSingleCurrentValue(param.value); } function doSingleValue(prompt) { document.writeln('<table border=0><tr><td class="list" colspan="2">'); document.writeln(prompt.prompt); document.writeln('</td></tr><tr><td class="list" width="150" valign="top">'); document.writeln(prompt.name); document.writeln('</td><td class="list" valign="top">'); var ctrl = new EditableDropDown (prompt); ctrl.WriteSingleItem("Prompt"); document.writeln('</td></tr>'); displayNullCheckBox(); document.writeln('</table>'); } function doMultipleSingleValues(prompt) { document.writeln('<table border="0"><tr><td class="list" colspan="3">'); document.writeln(prompt.prompt); document.writeln('<td class="list"> </tr><tr><td class="list" width="150" valign="top">'); document.writeln(prompt.name); document.writeln('</td><td class="list" valign="top">'); var ctrl = new EditableDropDown(prompt); ctrl.WriteSingleItem("Prompt"); document.writeln('</td><td class="list" valign="top">'); // add button document.writeln('<table border="0" cellpadding=0>'); document.writeln('<tr>'); document.writeln('<td class="clsButton" align=middle valign="top" nowrap>'); if (document.layers) document.writeln('<div class="clsButton"><a href="javascript: addItem(this.document.forms.valueListForm.valuelist)">' + _strAddBtn + '</a></div>'); else document.writeln('<div class="clsButton"><a href="javascript: addItem(this.document.forms.param.valuelist)">' + _strAddBtn + '</a></div>'); document.writeln('</td>'); document.writeln('</tr>'); document.writeln('</table>'); document.writeln('</td></tr></table>'); document.writeln('<table>'); document.writeln('<tr><td class="list" colspan="3"><hr size="1"></td></tr>'); document.writeln('<tr><td class="list" width="150">' + _currentVal + '</td><td>'); if (document.layers) document.writeln('<form name="valueListForm">'); document.writeln('<select name="valuelist" size=5>'); if ((document.layers) && (prompt.currentValues.length == 0)) document.writeln('<option> This is a formatting ...................... string '); for (var i=0; i<prompt.currentValues.length; i++) { document.writeln('<option value="' + prompt.currentValues[i].singleValue.value + '">' + prompt.currentValues[i].ValueDisplayString()); } document.writeln('</select>'); if (document.layers) document.writeln('</form>'); document.writeln('</td><td class="list" valign="top">'); document.writeln('<table border="0" cellpadding=0>'); document.writeln('<tr>'); document.writeln('<td class="clsButton" align=middle nowrap>'); if (document.layers) document.writeln('<div class="clsButton"><a href="javascript: removeItem(this.document.forms.valueListForm.valuelist)">' + _strRemoveBtn + '</a></div>'); else document.writeln('<div class="clsButton"><a href="javascript: removeItem(this.document.forms.param.valuelist)">' + _strRemoveBtn + '</a></div>'); document.writeln('</td></tr>'); document.writeln('</table>'); document.writeln('</td></tr>'); displayNullCheckBox(); document.writeln('</table>'); if ((document.layers) && (prompt.currentValues.length == 0)) { //netscape dest = this.document.forms.valueListForm.valuelist; dest.options[0] = null; } else if (prompt.currentValues.length == 0) { //ie dest = this.document.forms.param.valuelist; dest.options[0] = null; } } function addDiscreteString(s, dest) { g_mDiscreteList[g_mDiscreteList.length] = s; addItemString(s,dest); } function addDiscreteItem(dest) { var param = prompt.edtbox.getSingleValue(); if (param == -1) return; addDiscreteString(param.value, dest); } function doDiscreteRangeValue(prompt) { document.writeln('<table border=0><tr><td class="list" colspan="3">'); document.writeln(prompt.prompt); document.writeln('</td></tr><tr><td class="list" width="150" valign="top">'); document.writeln(prompt.name); document.writeln('</td><td class="list" valign="top">'); var ctrl = new EditableDropDown (prompt); ctrl.WriteSingleItem("Prompt"); document.writeln('</td><td class="list">'); // add button document.writeln('<table border="0" cellpadding=0>'); document.writeln('<tr>'); document.writeln('<td class="clsButton" align=middle nowrap>'); if (document.layers) document.writeln('<div class="clsButton"><a href="javascript: addDiscreteItem(this.document.forms.valueListForm.valuelist)">' + _strAddBtn + '</a></div>'); else document.writeln('<div class="clsButton"><a href="javascript: addDiscreteItem(this.document.forms.param.valuelist)">' + _strAddBtn + '</a></div>'); document.writeln('</td>'); document.writeln('</tr>'); document.writeln('</table>'); document.writeln('</td></tr>'); document.writeln('<tr><td class="list" colspan=2><hr size="1"></td></tr>'); document.writeln('</table>'); var il = false, nl = false, iu = false, nu = false; if ( prompt.currentValues != null && prompt.currentValues.length >= 1 && prompt.currentValues[0].IsRangeValue ) { il = prompt.currentValues[0].rangeValue.includesLowerBound; iu = prompt.currentValues[0].rangeValue.includesUpperBound; nl = prompt.currentValues[0].rangeValue.hasNoLowerBound; nu = prompt.currentValues[0].rangeValue.hasNoUpperBound; } document.writeln('<table>'); document.writeln('<tr><td class="list" width="150" valign="top">' + _strStartRange + '</td>'); document.writeln('<td class="list">'); var ctrl = new EditableDropDown (prompt); ctrl.WriteMultipleItems("FromPrompt", true); document.writeln('</td></tr>'); document.writeln('<tr><td class="list"></td><td class="list">'); if (document.layers) { document.writeln('<form name="lowerForm">'); writeCheckbox('includesLower', _strInclude, il, ''); writeCheckbox('hasNoLower', _strNoLower, nl, '' ); document.writeln('</form>'); } else { writeCheckbox('includesLower', _strInclude, il, 'ToggleInclude(document.forms.param.includesLower, document.forms.param.hasNoLower, document.forms.param.hasNoUpper);'); writeCheckbox('hasNoLower', _strNoLower, nl, 'ToggleBound(document.forms.param.hasNoLower, document.forms.param.hasNoUpper, document.forms.param.includesLower, document.forms.param.includesUpper);'); } document.writeln('</td><td class="list"></td></tr>'); document.writeln('<tr><td class="list" valign="top">' + _strEndRange + '</td>'); document.writeln('<td class="list">'); var ctrl = new EditableDropDown (prompt); ctrl.WriteMultipleItems("ToPrompt", false); document.writeln('</td><td class="list"></td> </tr>'); document.writeln('<tr><td class="list"></td><td class="list">'); if (document.layers) { document.writeln('<form name="upperForm">'); writeCheckbox('includesUpper', _strInclude, iu, ''); writeCheckbox('hasNoUpper', _strNoUpper, nu, ''); document.writeln('</form>'); } else { writeCheckbox('includesUpper', _strInclude, iu, 'ToggleInclude(document.forms.param.includesUpper, document.forms.param.hasNoUpper, document.forms.param.hasNoLower);'); writeCheckbox('hasNoUpper', _strNoUpper, nu, 'ToggleBound(document.forms.param.hasNoUpper, document.forms.param.hasNoLower, document.forms.param.includesUpper, document.forms.param.includesLower);'); } // init for checkboxes if (document.layers == null) { ToggleInclude(document.forms.param.includesLower, document.forms.param.hasNoLower, document.forms.param.hasNoUpper); ToggleBound(document.forms.param.hasNoLower, document.forms.param.hasNoUpper, document.forms.param.includesLower, document.forms.param.includesUpper); ToggleInclude(document.forms.param.includesUpper, document.forms.param.hasNoUpper, document.forms.param.hasNoLower); ToggleBound(document.forms.param.hasNoUpper, document.forms.param.hasNoLower, document.forms.param.includesUpper, document.forms.param.includesLower); } document.writeln('</td></tr>'); document.writeln('</table>'); // add button document.writeln('<table>'); document.writeln('<tr><td colspan=2 class="list"></td><td align=right>'); document.writeln('<table border="0" cellpadding=0>'); document.writeln('<tr>'); document.writeln('<td class="clsButton" align=middle nowrap>'); if (document.layers) document.writeln('<div class="clsButton"><a href="javascript: addRangeItem(this.document.forms.valueListForm.valuelist)">' + _strAddBtn + '</a></div>'); else document.writeln('<div class="clsButton"><a href="javascript: addRangeItem(this.document.forms.param.valuelist)">' + _strAddBtn + '</a></div>'); document.writeln('</td>'); document.writeln('</tr>'); document.writeln('</table>'); document.writeln('</td></tr>'); document.writeln('<tr><td class="list" colspan=3><hr size="1"></td></tr>'); document.writeln('<tr><td class="list" width="150">' + _currentVal + '</td><td>'); if (document.layers) document.writeln('<form name="valueListForm">'); document.writeln('<select name="valuelist" size=5>'); document.writeln('<option> This is a formatting ...................... string '); document.writeln('</select>'); if (document.layers) document.writeln('</form>'); document.writeln('</td><td class="list" valign="top" align=right>'); // remove button document.writeln('<table border="0" cellpadding=0>'); document.writeln('<tr>'); document.writeln('<td class="clsButton" align=middle nowrap>'); if (document.layers) document.writeln('<div class="clsButton"><a href="javascript: removeDiscreteRangeItem(this.document.forms.valueListForm.valuelist)">' + _strRemoveBtn + '</a></div>'); else document.writeln('<div class="clsButton"><a href="javascript: removeDiscreteRangeItem(this.document.forms.param.valuelist)">' + _strRemoveBtn + '</a></div>'); document.writeln('</td></tr>'); document.writeln('</table>'); document.writeln('</td></tr>'); displayNullCheckBox(); document.writeln('</table>'); var dest; if (document.layers) { dest = this.document.forms.valueListForm.valuelist; dest.options[0] = null; } else { dest = this.document.forms.param.valuelist; dest.options[0] = null; } for (var i=0; i<prompt.currentValues.length; i++) { if (prompt.currentValues[i].IsRangeValue) { addRangeString (prompt.currentValues[i].rangeValue.fromValue, prompt.currentValues[i].rangeValue.toValue, prompt.currentValues[i].rangeValue.includesLowerBound, prompt.currentValues[i].rangeValue.hasNoLowerBound, prompt.currentValues[i].rangeValue.includesUpperBound, prompt.currentValues[i].rangeValue.hasNoUpperBound, dest, prompt.editMask); } else if (prompt.currentValues[i].IsSingleValue) { addDiscreteString(prompt.currentValues[i].singleValue.value, dest); } } // end for } </script> </HEAD> <BODY LEFTMARGIN="50" > <DIV ID="tooltip" STYLE="position:absolute;visibility:hidden;z-index:99;"></DIV> <SCRIPT SRC="%5js/helps.js"></SCRIPT> <SCRIPT SRC="%6js/tips.js"></SCRIPT> <SPAN CLASS="clsUserInstruction">Set the initial value for this parameter</SPAN> <BR> <FORM NAME="param" onsubmit="return false;"> <script> init(); </script> <br> <br> <br> <table border=0 align="right" cellpadding=0> <tr valign=center> <td class="clsButton" align=middle nowrap> <div class="clsButton"><a href="javascript: submit()" onMouseOver="St(7);window.status='';return true;" onMouseOut="Ht()">OK</a></div> </td> <td class="clsButton" align=middle nowrap> <div class="clsButton"><a href="#" onClick="javascript: history.back();return false" onMouseOver="St(8);window.status='';return true;" onMouseOut="Ht()">Cancel</a></div> </td> </tr> </table> </FORM> </BODY> </HTML>